package server;

import java.io.IOException;

public class LagouServlet2 extends HttpServlet {
    public void doGet(Request request, Response response) {
        System.out.println("demo2 -- LagouServlet2 -- GET");
        try {
            response.output(HttpProtocolUtil.getHttpHeader200("demo2 -- LagouServlet2 -- GET".length())+"demo2 -- LagouServlet2 -- GET");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void doPost(Request request, Response response) {
        System.out.println("demo2 -- LagouServlet2 -- POST");
        try {
            response.output(HttpProtocolUtil.getHttpHeader200("demo2 -- LagouServlet2 -- POST".length())+"demo2 -- LagouServlet2 -- POST");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void init() throws Exception {

    }

    public void destory() throws Exception {

    }
}
